<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <a href="http://www.atguigu.com" @click.prevent="aFn">回娘家</a>

        <input type="text" v-model="msg" @keydown.13="keydownFn" >
    </div>
</body>
<script src="../../js/vue.js"></script>
<script>
    new Vue({
        el:"#app",
        data:{
            msg:""
        },
        methods:{
            aFn(){
                alert("aFn")
            },
            keydownFn(){
                console.log(this.msg)
            }
        }
    })
    
</script>
</html>